package cn.cvs.service.impl;

import cn.cvs.dao.FruitMapper;
import cn.cvs.entity.Fruit;
import cn.cvs.service.FruitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FruitServiceImpl implements FruitService {

    @Autowired
    private FruitMapper fruitMapper;

    @Override
    public List<Fruit> list() {
        return fruitMapper.list();
    }

    @Override
    public Fruit selectById(int id) {
        return fruitMapper.selectById(id);
    }

    @Override
    public int delete(int id) {
        return fruitMapper.delete(id);
    }

    @Override
    public int add(Fruit fruit) {
        return fruitMapper.add(fruit);
    }

    @Override
    public Fruit selectByType(String type) {
        return fruitMapper.selectByType(type);
    }
}
